

import React, {Component} from 'react';
import {StyleSheet, Text, View} from 'react-native';

var name = 'gaobo';
var age = 30;
export {name, age};

export default class Hello extends Component<Props> {
    render() {
        return (
            <View style={styles.container}>
                <Text style={styles.welcome}>Welcome to React Native!!!</Text>
            </View>
        );
    }
}

// var Hello = React.createClass(
//     {
//         render() {
//             return (
//                 <View style={styles.container}>
//                     <Text style={styles.welcome}>Welcome to React Native!!!</Text>
//                 </View>
//             );
//         }
//     }
// );

// module.exports = Hello;

export function add(a, b) {
    return a + b;
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#FFFFFF',
    },
    welcome: {
        fontSize: 40,
        textAlign: 'center',
        margin: 10,
    },
    instructions: {
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    },
});